<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib prefix="logic" uri="http://struts.apache.org/tags-logic"%>
<%@taglib prefix="html" uri="http://struts.apache.org/tags-html"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>


<bean:define id="role" value="${auth.role.roleType}" scope="session" />
<logic:equal name="role" value="dispatcher">
	<html:form action="/modifyFlightCrewAction">
		<html:hidden property="flightCrewId"
			value="${flightCrew.flightCrewId}" />
		<h1>
			<bean:message key="flightCrew.title.modify" />
		</h1>
		<b>${flightCrew.flightCrewName}</b>
		<br />
		<bean:message key="crew.structure" />
		<br />
		<table>
			<c:forEach var="emp" items="${flightCrew.employees}">
				<tr>
					<th><html:radio property="employeeId" value="${emp.id}" /></th>
					<th>${emp.name}</th>
					<th>${emp.surname}</th>
					<th>${emp.speciality.specialityName}</th>
				<tr>
			</c:forEach>
		</table>
		<html:submit property="method">
			<bean:message key="flightCrew.employee.add" />
		</html:submit>
		<html:submit property="method">
			<bean:message key="flightCrew.employee.delete" />
		</html:submit>

	</html:form>
</logic:equal>